<%@ page import="com.dbb.entity.order.Orders" %>



<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'orderNum', 'error')} required">
	<label for="orderNum">
		<g:message code="orders.orderNum.label" default="Order Num" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="orderNum" type="number" value="${ordersInstance.orderNum}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'customer', 'error')} required">
	<label for="customer">
		<g:message code="orders.customer.label" default="Customer" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="customer" name="customer.id" from="${com.dbb.entity.company.Company.list()}" optionKey="id" required="" value="${ordersInstance?.customer?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'deliveryDate', 'error')} required">
	<label for="deliveryDate">
		<g:message code="orders.deliveryDate.label" default="Delivery Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="deliveryDate" precision="day"  value="${ordersInstance?.deliveryDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'deliveryPlace', 'error')} ">
	<label for="deliveryPlace">
		<g:message code="orders.deliveryPlace.label" default="Delivery Place" />
		
	</label>
	<g:textField name="deliveryPlace" value="${ordersInstance?.deliveryPlace}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'discrepancyAndClaim', 'error')} ">
	<label for="discrepancyAndClaim">
		<g:message code="orders.discrepancyAndClaim.label" default="Discrepancy And Claim" />
		
	</label>
	<g:textField name="discrepancyAndClaim" value="${ordersInstance?.discrepancyAndClaim}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'inspection', 'error')} ">
	<label for="inspection">
		<g:message code="orders.inspection.label" default="Inspection" />
		
	</label>
	<g:textField name="inspection" value="${ordersInstance?.inspection}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'items', 'error')} ">
	<label for="items">
		<g:message code="orders.items.label" default="Items" />
		
	</label>
	<g:select name="items" from="${com.dbb.entity.order.OrderItem.list()}" multiple="multiple" optionKey="id" size="5" value="${ordersInstance?.items*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'orderDate', 'error')} required">
	<label for="orderDate">
		<g:message code="orders.orderDate.label" default="Order Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="orderDate" precision="day"  value="${ordersInstance?.orderDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'orderRef', 'error')} ">
	<label for="orderRef">
		<g:message code="orders.orderRef.label" default="Order Ref" />
		
	</label>
	<g:textField name="orderRef" value="${ordersInstance?.orderRef}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'payment', 'error')} ">
	<label for="payment">
		<g:message code="orders.payment.label" default="Payment" />
		
	</label>
	<g:textField name="payment" value="${ordersInstance?.payment}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'productionDesc', 'error')} ">
	<label for="productionDesc">
		<g:message code="orders.productionDesc.label" default="Production Desc" />
		
	</label>
	<g:textField name="productionDesc" value="${ordersInstance?.productionDesc}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'status', 'error')} ">
	<label for="status">
		<g:message code="orders.status.label" default="Status" />
		
	</label>
	<g:textField name="status" value="${ordersInstance?.status}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'supplier', 'error')} required">
	<label for="supplier">
		<g:message code="orders.supplier.label" default="Supplier" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="supplier" name="supplier.id" from="${com.dbb.entity.company.Company.list()}" optionKey="id" required="" value="${ordersInstance?.supplier?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'type', 'error')} ">
	<label for="type">
		<g:message code="orders.type.label" default="Type" />
		
	</label>
	<g:textField name="type" value="${ordersInstance?.type}"/>
</div>

